package com.xxhui.serializationdemo;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.xxhui.serializationdemo.module.Student;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void click(View v){
        Intent intent = new Intent("showdate");
        Student studentP = new Student();
        com.xxhui.serializationdemo.modules.Student studentS = new com.xxhui.serializationdemo.modules.Student();
        studentP.setId(123456);
        studentS.setId(123456);
        studentP.setName("I'm Parcelable");
        studentS.setName("I'm Serializable");
        intent.putExtra("studentP",studentP);
        intent.putExtra("studentS",studentS);
        startActivity(intent);
    }
}
